package com.hcy.rabbitbasicmodel.enums;

import lombok.Data;

/**
 * @Author huchenying
 * @Description
 * @Date 2021/11/11
 **/
public enum Code {
    Success(200),Fail(400), Exception(500),UNAUTH(401);
    final Integer code;
    Code(int code){
       this.code = code;
    }

    public int getCode() {
        return code;
    }

    public boolean isSuccess(){
        return this.code.equals(200);
    }
    public boolean noSuccess(){
        return !this.code.equals(200);
    }
}
